<?php
// 本类由系统自动生成，仅供测试用途
class IndexAction extends  CommAction {
    public function index(){ 
		$news_array = M("article")->order("ctime desc")->limit("8")->findall();

		//dump($news_array);
		$news_string = "";
		foreach($news_array as $v){
			
			$news_string = $news_string."<li><a href='__APP__/News/news_show/nid/".$v['id']."' >".$v['title']."</a><span class='news_time'>".date('Y-m-d H:i:s',$v['ctime'])."</span></li>";
			
			
		}
		$news_string = "<ul>".$news_string."</ul>";
		
		
		$this->assign("news_result",$news_string);
    	$this->display("public:index");
     }
}
?>